From d98419b55acfb860b85b1b2b27123ccf80182ba0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 1 Sep 2003 05:45:44 +0000 Subject: [PATCH] (previous-error): Accept a prefix argument, similarly to next-error. --- lisp/progmodes/compile.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 3effe71d30b..f2bffa1a089 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1751,11 +1751,15 @@ See variables `compilation-parse-errors-function' and (consp argp)))) ;;;###autoload (define-key ctl-x-map "`" 'next-error) -(defun previous-error () +(defun previous-error (argp) "Visit previous compilation error message and corresponding source code. -This operates on the output from the \\[compile] command." - (interactive) - (next-error -1)) + +A prefix ARGP specifies how many error messages to move; +negative means move forward to next error messages. + +This operates on the output from the \\[compile] and \\[grep] commands." + (interactive "P") + (next-error (- (prefix-numeric-value argp)))) (defun first-error () "Reparse the error message buffer and start at the first error. -- 2.30.2